home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 159
/
159.d81
/
floyd kirk
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
2KB
|
52 lines
6 poke53371,0:rem 20 mhz if supercpu
8 dv=peek(186):ifdv<8thendv=8
10 print "[147] [195]rypto [195]hallenge [211]olution [199]enerator"
20 print " (puzzle on [204][207][193][196][211][212][193][210] [201]ssue 156 [196]isk 2)"
30 print tab(7);"[208]rogrammed by [198]loyd [210]. [203]irk": print
40 print "[208]lace a newly formatted disk in drive 8."
50 print "[211]olutions will be generated, shown on"
60 print "the screen, and stored on disk in a"
70 print "sequential file (which can be read by a"
80 print "[211]olution [210]eader program also on the"
90 print "disk). [212]his program takes about 2 hours"
100 print "and 15 minutes to run on a 1 [205][200]z [195]-64"
110 print "and the solution file takes about 637"
120 print "blocks on a disk (there are 2808"
130 print "solutions).": print
140 print "[208]ress [211][208][193][195][197] [194][193][210] to continue.": print: a$=""
150 get a$: if a$="" then 150
160 remopen 8,dv,8,"0:solutions,s,w":rem rem this line if disk file not wanted
170 sc=0: for o=-19 to 19
180 for n=19 to -19 step -1: if n=o then 450
190 e=1-o-n: if e<-19 or e>19 or e=o or e=n then 450
200 t=10-e-n: if t<-19 or t>19 or t=o or t=n or t=e then 450
210 i=9-n-n-e: if i<-19 or i>19 or i=o or i=n or i=e or i=t then 450
220 w=2-t-o: if w<-19 or w>19 or w=o or w=n or w=e or w=t or w=i then 450
230 for l=-19 to 19: if l=o or l=n or l=e or l=t or l=i or l=w then 440
240 v=11-e-l-e-e-n: if v<-19 or v>19 or v=o or v=n or v=e or v=t then 440
250 if v=i or v=w or v=l then 440
260 if t+w+e+l+v+e<>12 then 440
270 s=7-e-v-e-n: if s<-19 or s>19 then 440
280 if s=e or s=i or s=l or s=n or s=o or s=t or s=v or s=w then 440
290 x=6-s-i: if x<-19 or x>19 then 440
300 if x=e or x=i or x=l or x=n or x=o or x=t or x=v or x=w or x=s then 440
310 f=5-i-v-e: if f<-19 or f>19 or f=w or f=x then 440
320 if f=e or f=i or f=l or f=n or f=o or f=s or f=t or f=v then 440
330 for r=19 to -19 step -1: if r=e or r=f or r=i or r=l or r=n then 430
340 if r=o or r=s or r=t or r=v or r=w or r=x then 430
350 h=3-t-r-e-e: if h<-19 or h>19 or h=e or h=f or h=i or h=l or h=n then 430
360 if h=o or h=r or h=s or h=t or h=v or h=w or h=x then 430
370 g=8-e-i-h-t: if g<-19 or g>19 or g=e or g=f or g=h or g=i or g=l then 430
380 if g=n or g=o or g=r or g=s or g=t or g=v or g=w or g=x then 430
390 u=4-f-o-r: if u<-19 or u>19 or u=e or u=f or u=g or u=h or u=i then 430
400 if u=l or u=n or u=o or u=r or u=s or u=t or u=v or u=w or u=x then 430
410 sc=sc+1: print sc;e;f;g;h;i;l;n;o;r;s;t;u;v;w;x: print
420 rem print#8,sc;e;f;g;h;i;l;n;o;r;s;t;u;v;w;x:rem rem line if file not wanted
430 next r
440 next l
450 next n
460 next o
470 close8
480 end
10000 d=peek(186):n$="floyd kirk":open15,d,15,"s0:"+n$:close15:saven$,d:end